package cn.itcast.n3;

import lombok.extern.slf4j.Slf4j;

/**
 * 演示多个线程并发交替执行
 * @author yd
 * @version 1.0
 * @date 2022/3/12 19:28
 */
@Slf4j(topic = "w.TestMultiThread")
public class TestMultiThread {

    public static void main(String[] args) {
        new Thread(() -> {
            while(true){
                log.debug("running");
            }
        }, "t1").start();

        new Thread(() -> {
            while (true){
                log.debug("running");
            }
        }, "t2").start();


    }
}
